package serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import mapper.UserMapper;
import model.User;
import service.UserService;

public class UserServiceImpl implements UserService{
	
	@Autowired
	private UserMapper userMapper;
	
	@Override
	public User selectUserById(int id) throws Exception {
		User user=userMapper.selectUserById(id);
		return user;
	}

	@Override
	public List<User> selectUserByName(String name) throws Exception {
		List<User> list =userMapper.selectUserByName(name);
		return list;
	}

}
